package com.ziqikeji.xianyan.entity.recommend;

import com.ziqikeji.xianyan.common.BaseEntity;
import com.ziqikeji.xianyan.entity.user.User;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import java.util.Date;

/**
 * 作者推荐
 * @author liuyu
 */
@Entity
@Table(name = "author_recommend")
public class AuthorRecommend extends BaseEntity {

    /**
     * 推荐作者
     */
    private User article;
    /**
     * 推荐理由
     */
    private String recommendedReason;
    /**
     * 推荐时间
     */
    private Date recommendedTime;

    @ManyToOne
    @JoinColumn(name = "article_id")
    public User getArticle() {
        return article;
    }

    public void setArticle(User article) {
        this.article = article;
    }

    public String getRecommendedReason() {
        return recommendedReason;
    }

    public void setRecommendedReason(String recommendedReason) {
        this.recommendedReason = recommendedReason;
    }

    public Date getRecommendedTime() {
        return recommendedTime;
    }

    public void setRecommendedTime(Date recommendedTime) {
        this.recommendedTime = recommendedTime;
    }
}
